The present invention, in some embodiments thereof, relates to virtualization and, more particularly, but not exclusively, to methods and systems of managing resources allocated to guest virtual machines.
During the last years, the concept of server consolidation prevails. Many small physical servers are replaced by one larger physical server to increase the utilization of costly hardware resources such as CPU, storage and network access. Although hardware is consolidated, the software is not. Instead, each server is replaced with a respective virtual machine having an operating system (OS) which is executed on the larger physical server. The large server hosts many such guest virtual machines; each executes programs like a physical machine. The hosting of the virtual machines is known as full virtualization. Full virtualization requires that every salient feature of the emulated hardware be reflected into one of several virtual machines—including the full instruction set, input/output operations, interrupts, memory access, and whatever other elements are used by the software that runs on the bare machine, and that is intended to run in a virtual machine. In such an environment, any software capable of execution on the raw hardware can be run in the virtual machine and, in particular, any operating systems.
Virtualization allows multiplexing of the underlying host machine between different virtual machines. The host computer allocates a certain amount of its resources to each of the virtual machines. Each virtual machine is then able to use the allocated resources to execute applications, including operating systems, referred to as guest operating systems. The software layer providing the virtualization is commonly referred to as a hypervisor and is also known as a virtual machine monitor (VMM). The hypervisor emulates the underlying hardware of the host computer, making the use of the virtual machine transparent to the guest operating system.
During the last years a number of developments have been conceived to increase the efficiency of the virtual machines which are hosted on a host. For example, U.S Patent Application No. 2010/0306173 describes a method and system for handling temporary data of a virtual machine are described. In one embodiment, virtual machines are hosted by a server and accessed by remote clients over a network. The server assigns first storage and second storage to each virtual machine, where the first storage is designated for temporary data of a respective virtual machine and the second storage is designated for persistent data of a respective virtual machine. The server monitors events pertaining to the virtual machine. Upon detecting a predefined event pertaining to one of the virtual machines, the server causes at least a subset of the temporary data to be removed from the first storage of this virtual machine.